package org.pp.admin.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
public class SysUserAdd {

    @Schema(description = "密码")
    @NotBlank(message = "密码长度在6-18位")
    @Size(min = 6,max=18,message = "密码长度在6-18位")
    private String password;

    @Schema(description = "用户名")
    @NotBlank(message = "用户名不为空")
    @Pattern(regexp = "^[a-zA-Z]*$",message = "用户名为全英文")
    private String userName;

    @Schema(description = "姓名/昵称")
    @NotBlank(message = "姓名/昵称不为空")
    private String name;

    @Schema(description = "手机号")
    @Pattern(regexp = "^$|^1\\d{10}$",message = "手机号格式错误")
    private String phone;

    @Schema(description = "角色id")
    List<Long> roleIds;
}
